package com.langll.ai.neo4j.node;

import com.langll.ai.neo4j.relation.GenerateProduct;
import com.langll.ai.neo4j.relation.LastGenPortfolio;
import com.langll.ai.neo4j.relation.LifecycleExtendPortfolio;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.Relationship;

import java.util.List;

@Data
@Node("Portfolio")
@NoArgsConstructor
@AllArgsConstructor
public class Portfolio {
    @Id
    private Long id;

    @Property
    private String name;

    @Property
    private String masterId;

    @Relationship(type = "Generate", direction = Relationship.Direction.OUTGOING)
    private List<GenerateProduct> generateProducts;

    @Relationship(type = "LifecycleExtend", direction = Relationship.Direction.OUTGOING)
    private List<LifecycleExtendPortfolio> lifecycleExtendPortfolios;

    @Relationship(type = "LastGen", direction = Relationship.Direction.INCOMING)
    private List<LastGenPortfolio> lastGenPortfolios;
}
